package org.osomit.sacct.entity;

import org.json.simple.JSONObject;

/**
 * @author Jian Fang (John.Jian.Fang@gmail.com)
 *
 * Date: Jul 2, 2009
 */
public class SessionInfo extends Entity{
    private static final long serialVersionUID = -7491476565797722757L;
    public final static String ENTITY_NAME = "SessionInfo";

    public final static String SERVER_PUBLIC_KEY = "serverPublicKey";
    private String serverPublicKey;

    public final static String SESSION_ID = "sessionId";
    private String sessionId;

    public String getServerPublicKey() {
        return serverPublicKey;
    }

    public void setServerPublicKey(String serverPublicKey) {
        this.serverPublicKey = serverPublicKey;
    }

    public String getSessionId() {
        return sessionId;
    }

    public void setSessionId(String sessionId) {
        this.sessionId = sessionId;
    }

    public JSONObject toJSON() {
        JSONObject obj = new JSONObject();

        obj.put(SERVER_PUBLIC_KEY, this.serverPublicKey);
        obj.put(SESSION_ID, this.sessionId);

        return obj;
    }
}
